<script lang="ts" setup>
import { inject } from "vue";
defineProps({
  // text: {
  //   type: String,
  //   default: '暂无数据',
  // },
  iconWidth: {
    type: Number,
    default: 120,
  },
});
const langMsg:any = inject("langMsg");
// const text = ref('暂无数据')
</script>
<script lang="ts">
export default {
  //组件名称
  name: "NoData",
};
</script>
<template>
  <div class="box">
    <img :width="iconWidth" src="@/assets/images/icon14@2x.png" />
    <div class="text">{{ langMsg?.nodataavailable || "暂无数据" }}</div>
  </div>
</template>
<style lang="scss">
.box {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;

  .text {
    color: #ffffff;
    opacity: 0.7;
    height: 30px;
    line-height: 30px;
    flex-grow: 0;
  }
}
</style>
